.class public Lcom/fiberhome/gaea/client/d/a/a;
.super Ljava/lang/Object;


# instance fields
.field public a:Lorg/w3c/dom/Element;

.field private b:Ljavax/xml/parsers/DocumentBuilderFactory;

.field private c:Ljavax/xml/parsers/DocumentBuilder;

.field private d:Lorg/w3c/dom/Document;


# direct methods
.method public constructor <init>()V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->b:Ljavax/xml/parsers/DocumentBuilderFactory;

    iput-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->c:Ljavax/xml/parsers/DocumentBuilder;

    iput-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    iput-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->a:Lorg/w3c/dom/Element;

    return-void
.end method

.method public constructor <init>(Lorg/w3c/dom/Element;)V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->b:Ljavax/xml/parsers/DocumentBuilderFactory;

    iput-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->c:Ljavax/xml/parsers/DocumentBuilder;

    iput-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    iput-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->a:Lorg/w3c/dom/Element;

    iput-object p1, p0, Lcom/fiberhome/gaea/client/d/a/a;->a:Lorg/w3c/dom/Element;

    return-void
.end method

.method public static a(Lorg/w3c/dom/Node;)Ljava/lang/String;
    .locals 7

    invoke-interface {p0}, Lorg/w3c/dom/Node;->getChildNodes()Lorg/w3c/dom/NodeList;

    move-result-object v1

    invoke-interface {v1}, Lorg/w3c/dom/NodeList;->getLength()I

    move-result v2

    new-instance v3, Ljava/lang/StringBuffer;

    invoke-direct {v3}, Ljava/lang/StringBuffer;-><init>()V

    const/4 v0, 0x0

    :goto_0
    if-ge v0, v2, :cond_1

    invoke-interface {v1, v0}, Lorg/w3c/dom/NodeList;->item(I)Lorg/w3c/dom/Node;

    move-result-object v4

    invoke-interface {v4}, Lorg/w3c/dom/Node;->getNodeType()S

    move-result v5

    const/4 v6, 0x3

    if-ne v5, v6, :cond_0

    invoke-interface {v4}, Lorg/w3c/dom/Node;->getNodeValue()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    :cond_0
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_1
    invoke-virtual {v3}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method


# virtual methods
.method public a(Ljava/lang/String;)Lcom/fiberhome/gaea/client/d/a/a;
    .locals 3

    iget-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->a:Lorg/w3c/dom/Element;

    invoke-interface {v0, p1}, Lorg/w3c/dom/Element;->getElementsByTagName(Ljava/lang/String;)Lorg/w3c/dom/NodeList;

    move-result-object v0

    invoke-interface {v0}, Lorg/w3c/dom/NodeList;->getLength()I

    move-result v1

    const/4 v2, 0x1

    if-ge v1, v2, :cond_0

    const/4 v0, 0x0

    :goto_0
    return-object v0

    :cond_0
    new-instance v1, Lcom/fiberhome/gaea/client/d/a/a;

    invoke-direct {v1}, Lcom/fiberhome/gaea/client/d/a/a;-><init>()V

    const/4 v2, 0x0

    invoke-interface {v0, v2}, Lorg/w3c/dom/NodeList;->item(I)Lorg/w3c/dom/Node;

    move-result-object v0

    check-cast v0, Lorg/w3c/dom/Element;

    iput-object v0, v1, Lcom/fiberhome/gaea/client/d/a/a;->a:Lorg/w3c/dom/Element;

    move-object v0, v1

    goto :goto_0
.end method

.method public a()Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->a:Lorg/w3c/dom/Element;

    invoke-static {v0}, Lcom/fiberhome/gaea/client/d/a/a;->a(Lorg/w3c/dom/Node;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public a(Ljava/io/InputStream;)Z
    .locals 5

    const/4 v0, 0x1

    const/4 v1, 0x0

    const/4 v4, 0x0

    :try_start_0
    invoke-static {}, Ljavax/xml/parsers/DocumentBuilderFactory;->newInstance()Ljavax/xml/parsers/DocumentBuilderFactory;

    move-result-object v2

    iput-object v2, p0, Lcom/fiberhome/gaea/client/d/a/a;->b:Ljavax/xml/parsers/DocumentBuilderFactory;

    iget-object v2, p0, Lcom/fiberhome/gaea/client/d/a/a;->b:Ljavax/xml/parsers/DocumentBuilderFactory;

    const/4 v3, 0x1

    invoke-virtual {v2, v3}, Ljavax/xml/parsers/DocumentBuilderFactory;->setIgnoringElementContentWhitespace(Z)V

    iget-object v2, p0, Lcom/fiberhome/gaea/client/d/a/a;->b:Ljavax/xml/parsers/DocumentBuilderFactory;

    invoke-virtual {v2}, Ljavax/xml/parsers/DocumentBuilderFactory;->newDocumentBuilder()Ljavax/xml/parsers/DocumentBuilder;

    move-result-object v2

    iput-object v2, p0, Lcom/fiberhome/gaea/client/d/a/a;->c:Ljavax/xml/parsers/DocumentBuilder;

    iget-object v2, p0, Lcom/fiberhome/gaea/client/d/a/a;->c:Ljavax/xml/parsers/DocumentBuilder;

    invoke-virtual {v2, p1}, Ljavax/xml/parsers/DocumentBuilder;->parse(Ljava/io/InputStream;)Lorg/w3c/dom/Document;

    move-result-object v2

    iput-object v2, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    iget-object v2, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    invoke-interface {v2}, Lorg/w3c/dom/Document;->getDocumentElement()Lorg/w3c/dom/Element;

    move-result-object v2

    iput-object v2, p0, Lcom/fiberhome/gaea/client/d/a/a;->a:Lorg/w3c/dom/Element;
    :try_end_0
    .catch Lorg/xml/sax/SAXException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljavax/xml/parsers/ParserConfigurationException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_2
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    iget-object v2, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    if-eqz v2, :cond_0

    iget-object v2, p0, Lcom/fiberhome/gaea/client/d/a/a;->a:Lorg/w3c/dom/Element;

    if-nez v2, :cond_1

    :cond_0
    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    move v0, v1

    :goto_0
    return v0

    :cond_1
    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->c:Ljavax/xml/parsers/DocumentBuilder;

    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->b:Ljavax/xml/parsers/DocumentBuilderFactory;

    goto :goto_0

    :catch_0
    move-exception v0

    iget-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->a:Lorg/w3c/dom/Element;

    if-nez v0, :cond_3

    :cond_2
    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    move v0, v1

    goto :goto_0

    :cond_3
    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->c:Ljavax/xml/parsers/DocumentBuilder;

    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->b:Ljavax/xml/parsers/DocumentBuilderFactory;

    move v0, v1

    goto :goto_0

    :catch_1
    move-exception v0

    iget-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    if-eqz v0, :cond_4

    iget-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->a:Lorg/w3c/dom/Element;

    if-nez v0, :cond_5

    :cond_4
    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    move v0, v1

    goto :goto_0

    :cond_5
    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->c:Ljavax/xml/parsers/DocumentBuilder;

    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->b:Ljavax/xml/parsers/DocumentBuilderFactory;

    move v0, v1

    goto :goto_0

    :catch_2
    move-exception v0

    iget-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    if-eqz v0, :cond_6

    iget-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->a:Lorg/w3c/dom/Element;

    if-nez v0, :cond_7

    :cond_6
    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    move v0, v1

    goto :goto_0

    :cond_7
    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->c:Ljavax/xml/parsers/DocumentBuilder;

    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->b:Ljavax/xml/parsers/DocumentBuilderFactory;

    move v0, v1

    goto :goto_0

    :catchall_0
    move-exception v0

    iget-object v2, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    if-eqz v2, :cond_8

    iget-object v2, p0, Lcom/fiberhome/gaea/client/d/a/a;->a:Lorg/w3c/dom/Element;

    if-nez v2, :cond_9

    :cond_8
    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    move v0, v1

    goto :goto_0

    :cond_9
    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->d:Lorg/w3c/dom/Document;

    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->c:Ljavax/xml/parsers/DocumentBuilder;

    iput-object v4, p0, Lcom/fiberhome/gaea/client/d/a/a;->b:Ljavax/xml/parsers/DocumentBuilderFactory;

    throw v0
.end method

.method public b(Ljava/lang/String;)Ljava/lang/String;
    .locals 1

    invoke-virtual {p0, p1}, Lcom/fiberhome/gaea/client/d/a/a;->a(Ljava/lang/String;)Lcom/fiberhome/gaea/client/d/a/a;

    move-result-object v0

    if-nez v0, :cond_0

    const-string/jumbo v0, ""

    :goto_0
    return-object v0

    :cond_0
    invoke-virtual {v0}, Lcom/fiberhome/gaea/client/d/a/a;->a()Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method public c(Ljava/lang/String;)Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->a:Lorg/w3c/dom/Element;

    invoke-interface {v0, p1}, Lorg/w3c/dom/Element;->getAttribute(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    if-nez v0, :cond_0

    const-string/jumbo v0, ""

    :cond_0
    return-object v0
.end method

.method public d(Ljava/lang/String;)Lcom/fiberhome/gaea/client/d/a/b;
    .locals 6

    iget-object v0, p0, Lcom/fiberhome/gaea/client/d/a/a;->a:Lorg/w3c/dom/Element;

    new-instance v2, Lcom/fiberhome/gaea/client/d/a/b;

    invoke-direct {v2}, Lcom/fiberhome/gaea/client/d/a/b;-><init>()V

    if-eqz v0, :cond_2

    invoke-interface {v0}, Lorg/w3c/dom/Element;->getChildNodes()Lorg/w3c/dom/NodeList;

    move-result-object v3

    invoke-interface {v3}, Lorg/w3c/dom/NodeList;->getLength()I

    move-result v4

    const/4 v0, 0x0

    move v1, v0

    :goto_0
    if-ge v1, v4, :cond_2

    invoke-interface {v3, v1}, Lorg/w3c/dom/NodeList;->item(I)Lorg/w3c/dom/Node;

    move-result-object v0

    if-nez v0, :cond_1

    :cond_0
    :goto_1
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_0

    :cond_1
    invoke-interface {v0}, Lorg/w3c/dom/Node;->getNodeName()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v5, p1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_0

    :try_start_0
    new-instance v5, Lcom/fiberhome/gaea/client/d/a/a;

    check-cast v0, Lorg/w3c/dom/Element;

    invoke-direct {v5, v0}, Lcom/fiberhome/gaea/client/d/a/a;-><init>(Lorg/w3c/dom/Element;)V

    invoke-virtual {v2, v5}, Lcom/fiberhome/gaea/client/d/a/b;->a(Lcom/fiberhome/gaea/client/d/a/a;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    :catch_0
    move-exception v0

    goto :goto_1

    :cond_2
    return-object v2
.end method

.method public e(Ljava/lang/String;)Z
    .locals 2

    if-eqz p1, :cond_0

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v0

    if-gtz v0, :cond_1

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_1
    new-instance v0, Ljava/io/ByteArrayInputStream;

    invoke-virtual {p1}, Ljava/lang/String;->getBytes()[B

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/io/ByteArrayInputStream;-><init>([B)V

    invoke-virtual {p0, v0}, Lcom/fiberhome/gaea/client/d/a/a;->a(Ljava/io/InputStream;)Z

    move-result v0

    goto :goto_0
.end method
